

<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

     <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
		 .table-condensed tbody tr td span{display: block;}
      .ebgColor{background: rgb(231, 247, 255)}
    </style>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <!-- 标题 -->
    <div>
    <form action="" class="form-inline">
      <table class="row-margin-top tab-content table-bordered table bud_hei" border="1">
          <tr>
            <td><span class="lr_5"></span>
            年份： <select name="cid" id="cid" class="select form-control">
                 {volist name="cainian" id="c"}
                  <option value="{$c.id}" {if $cid==$c.id} selected {/if}>{$c.title}</option>
                 {/volist}
              </select><span class="lr_5"></span> <button type="button" class="btn-info btn btn-outline {if $tid==1} active {/if}" onclick="chanxun(1)">前5名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $tid==2} active {/if}" onclick="chanxun(2)">前20名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $tid==3} active {/if}" onclick="chanxun(3)">前50名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $tid==4} active {/if}" onclick="chanxun(4)">后50名</button><span class="lr_5"></span><button type="button" class="btn-info btn btn-outline {if $tid==5} active {/if}" onclick="chanxun(5)">查看所有</button><span class="lr_5"></span>
              <button type="button" class="btn-info btn btn-outline" onclick="dc({$cid},{$tid})">导出Excel</button></td>
		    </tr>
          <tr>
            <td>
                 <p class="text-center font-bold"><span >{$nian}</span>年&nbsp;经销商费用投入情况</p>
             <p class="text-right">单位(万元)</p>
             <p class="colorRed"><span class="lr_5"></span>说明：1、费用包括：常规促销申请费用、非常规促销申请费用和进场申请费用中可核销的部分。</p>
            </td>
          </tr>
      </table>
    
      <table class="table table-bordered text-right bud_hei" style="margin:0">
          <tr class="info">
            <th class="text-center">序号</th>
            <th class="text-center">区域</th>
            <th class="text-center">省份</th>
            <th class="text-center">城市</th>
            <th class="text-center">经销商名</th>
            <th class="text-center">项目</th>
            {volist name="kaohe2" id="vo"}
            <th class="text-center">{$vo.title}</th>
            {/volist}
            <th class="text-center">小计</th>
          </tr>
          <tbody style="border:0">
          {volist name="apply" id="vo" key="k"}
              <tr>
                <td class="text-center ebgColor" rowspan="3">{$k}</td>
                <td class="text-center ebgColor" rowspan="3">{$vo.fenqu}</td>
                <td class="text-center ebgColor"  rowspan="3">{$vo.sheng}</td>
                <td class="text-center ebgColor"  rowspan="3">{$vo.shi}</td>
                <td class="text-center ebgColor" rowspan="3">{$vo.jxs}</td>
                <td class="text-center">费用</td>
                {volist name="$vo.fy" id="f"}
                  <td class="ObjectNum">{$f}</td>
                {/volist}
                <td class="ObjectNum warning">{$vo.fei}</td>
              </tr>
              <tr>
               <td class="text-center">销量</td>
             {volist name="$vo.xl" id="f"}
                  <td class="ObjectNum">{$f}</td>
                {/volist}
                <td class="ObjectNum warning">{$vo.xiao}</td>
            </tr>
             <tr>
               <td class="text-center">费用率</td>
              {volist name="$vo.fyl" id="f"}
                  {if $f>0}
                  <td><span>{$f}</span>%</td>
                  {else}
                  <td>-</td>
                  {/if}
                {/volist}
              <td class="ObjectNum warning">{if $vo.zfyl>0}{$vo.zfyl}%{else/}-{/if}</td>
            </tr>
          {/volist}
			
          </tbody>
          <tfoot>
            <tr class="trTotal">
              <td rowspan="3"></td>
              <td rowspan="3"></td>
              <td rowspan="3"></td>
              <td rowspan="3"></td>
              <td rowspan="3"></td>
              <td class="text-center">总费用</td>
             {volist name="kaohe2" id="vo"}
              <td class="ObjectNum">{$vo.fy}</td>
             {/volist}
              <td class="ObjectNum">{$zongfy}</td>
            </tr>
            <tr  class="trTotal">
              <td class="text-center">总销量</td>
             {volist name="kaohe2" id="vo"}
              <td class="ObjectNum">{$vo.xl}</td>
             {/volist}
              <td class="ObjectNum">{$zongxl}</td>
            </tr>
              <tr class="trTotal">
                <td class="text-center">总费用率</td>
              {volist name="kaohe2" id="vo"}
              {if $vo.fyl>0}
              <td>{$vo.fyl}%</td>
              {else/}
              <td>-</td>
              {/if}
             {/volist}
             {if $zongfyl>0}
             <td>{$zongfyl}%</td>
             {else}
             <td>-</td>
             {/if}
              </tr>
          </tfoot>
      </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script src="__STATIC__/layout/js/common.js"></script>
    <script>
      function dc(cid,tid){
      window.open("{:url('jxstrdc')}?cid="+cid+"&tid="+tid)
    }
    function chanxun(tid){
            var cid=$("#cid").val();
            location.href="{:url('jxstr')}?cid="+cid+"&tid="+tid
          }
        $(document).ready(function(){
        	var $ObjectNum =$(".ObjectNum");
        	   toNum($ObjectNum);
        	   var Year= $("#Year option:selected").text(); 
         $("#selectText").html(Year)
          $('.yearpicker').datepicker({  
            startView: 'decade',  
             minView: 'decade',  
             format: 'yyyy',  
             maxViewMode: 2,  
             minViewMode:2,  
              autoclose: true  
            }); 

          $(".query").click(function(){
           var Year= $("#Year option:selected").text(); 
         $("#selectText").html(Year)

        })
      })
    </script>
</body>

</html>
